package com.jerry.mingxing.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.jerry.mingxing.R;

/**
 * Created by Administrator on 2016/8/29.
 */
public class MyView extends LinearLayout{

    private TextView tv;

    public MyView(Context context) {
        super(context);
        initView();
    }

    public MyView(Context context, AttributeSet attrs) {
        super(context, attrs);
        initView();
    }

    public MyView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        initView();
    }

    private void initView(){
        View view = LayoutInflater.from(getContext()).inflate(R.layout.myfragment_myview, this);
        tv = (TextView) findViewById(R.id.myfragment_myview_tv);

    }

    public void setTv(String title) {

        tv.setText(title);
    }
}
